 package cn.tedu.spring.homework3;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
//@Value  给属性注入值
//加注解

@Configuration
@PropertySource(value = {"classpath:homework3.properties"}, encoding = "Unicode")
@Component
public class Demo {
    @Value("${name}")
    private String nadme;
    @Value("#{@list1}")
    private List<String> list;

    @Override
    public String toString() {
        return "Demo{" +
                "name='" + name + '\'' +
                ", list=" + list ;
    }
}
